package com.so206.po;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;

public class QqpayConfig implements Serializable {
    private Long id;

    /**
    * 易支付通道名称
    */
    private String epayName;

    /**
    * 创建时间
    */
    private Date createTime;

    /**
    * 修改时间
    */
    private Date optTime;

    /**
    * 商户id
    */
    private String pid;

    /**
    * 商户秘钥
    */
    private String publicKeyMch;

    /**
    * 商户密码
    */
    private String publicKeyPwd;

    /**
    * QQ钱包支付证书
    */
    private byte[] payCert;

    /**
    * 排序号
    */
    private Integer orderBy;

    /**
    * 最小支付金额
    */
    private BigDecimal minPayMoney;

    /**
    * 最大支持金额
    */
    private BigDecimal maxPayMoney;

    /**
    * 状态:0.关闭,1.启用
    */
    private Integer status;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getEpayName() {
        return epayName;
    }

    public void setEpayName(String epayName) {
        this.epayName = epayName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getOptTime() {
        return optTime;
    }

    public void setOptTime(Date optTime) {
        this.optTime = optTime;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getPublicKeyMch() {
        return publicKeyMch;
    }

    public void setPublicKeyMch(String publicKeyMch) {
        this.publicKeyMch = publicKeyMch;
    }

    public String getPublicKeyPwd() {
        return publicKeyPwd;
    }

    public void setPublicKeyPwd(String publicKeyPwd) {
        this.publicKeyPwd = publicKeyPwd;
    }

    public byte[] getPayCert() {
        return payCert;
    }

    public void setPayCert(byte[] payCert) {
        this.payCert = payCert;
    }

    public Integer getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(Integer orderBy) {
        this.orderBy = orderBy;
    }

    public BigDecimal getMinPayMoney() {
        return minPayMoney;
    }

    public void setMinPayMoney(BigDecimal minPayMoney) {
        this.minPayMoney = minPayMoney;
    }

    public BigDecimal getMaxPayMoney() {
        return maxPayMoney;
    }

    public void setMaxPayMoney(BigDecimal maxPayMoney) {
        this.maxPayMoney = maxPayMoney;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", epayName=").append(epayName);
        sb.append(", createTime=").append(createTime);
        sb.append(", optTime=").append(optTime);
        sb.append(", pid=").append(pid);
        sb.append(", publicKeyMch=").append(publicKeyMch);
        sb.append(", publicKeyPwd=").append(publicKeyPwd);
        sb.append(", payCert=").append(payCert);
        sb.append(", orderBy=").append(orderBy);
        sb.append(", minPayMoney=").append(minPayMoney);
        sb.append(", maxPayMoney=").append(maxPayMoney);
        sb.append(", status=").append(status);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        QqpayConfig other = (QqpayConfig) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getEpayName() == null ? other.getEpayName() == null : this.getEpayName().equals(other.getEpayName()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getOptTime() == null ? other.getOptTime() == null : this.getOptTime().equals(other.getOptTime()))
            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
            && (this.getPublicKeyMch() == null ? other.getPublicKeyMch() == null : this.getPublicKeyMch().equals(other.getPublicKeyMch()))
            && (this.getPublicKeyPwd() == null ? other.getPublicKeyPwd() == null : this.getPublicKeyPwd().equals(other.getPublicKeyPwd()))
            && (Arrays.equals(this.getPayCert(), other.getPayCert()))
            && (this.getOrderBy() == null ? other.getOrderBy() == null : this.getOrderBy().equals(other.getOrderBy()))
            && (this.getMinPayMoney() == null ? other.getMinPayMoney() == null : this.getMinPayMoney().equals(other.getMinPayMoney()))
            && (this.getMaxPayMoney() == null ? other.getMaxPayMoney() == null : this.getMaxPayMoney().equals(other.getMaxPayMoney()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getEpayName() == null) ? 0 : getEpayName().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getOptTime() == null) ? 0 : getOptTime().hashCode());
        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
        result = prime * result + ((getPublicKeyMch() == null) ? 0 : getPublicKeyMch().hashCode());
        result = prime * result + ((getPublicKeyPwd() == null) ? 0 : getPublicKeyPwd().hashCode());
        result = prime * result + (Arrays.hashCode(getPayCert()));
        result = prime * result + ((getOrderBy() == null) ? 0 : getOrderBy().hashCode());
        result = prime * result + ((getMinPayMoney() == null) ? 0 : getMinPayMoney().hashCode());
        result = prime * result + ((getMaxPayMoney() == null) ? 0 : getMaxPayMoney().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }
}